
<html>
<head>
<meta charset="utf-8">
<script>
function login(api)
{   
    var xmlhttp;
	if (window.XMLHttpRequest)
	{
		//  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
		xmlhttp=new XMLHttpRequest();
	}   
	else
	{
		// IE6, IE5 浏览器执行代码
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
            console.log(xmlhttp.responseText); 
		}   
	}    
	xmlhttp.open("POST","http://ddz.lanyaotech.com/login"+api+"&proxy=weixin",true);
	xmlhttp.send();
}   

function weixin(){ 
    window.location.href='http://ddz.lanyaotech.com/wechat/login';
}

if(window.location.search!=""){
    login(window.location.search); 
}
</script>

</head>
<body> 
<button type="button" onclick="weixin()">微信登陆</button>
</body>
</html>
